package com.gof.example.prototype;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/2 11:52.
 * haiming.fei@tongdun.cn
 */
public class App {

    public static void main(String[] args) throws CloneNotSupportedException {
        Customer c = new Customer();
        Address a = new Address();
        a.setName("abc");
        c.setAddr(a);
        c.setFullName("jackson ma");
        System.out.println(c);


        Customer o = c.clone();
        a.setName("def");
        System.out.println(o);
    }
}
